home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Introduction to 3D Game …ogramming with DirectX 12
/
Introduction-to-3D-Game-Programming-with-DirectX-12.ISO
/
Code.Textures
/
Chapter 12 The Geometry Shader
/
TreeBillboards
/
FrameResource.cpp
next >
Wrap
C/C++ Source or Header
|
2016-03-02
|
790b
|
20 lines
#include "FrameResource.h"
FrameResource::FrameResource(ID3D12Device* device, UINT passCount, UINT objectCount, UINT materialCount, UINT waveVertCount)
{
ThrowIfFailed(device->CreateCommandAllocator(
D3D12_COMMAND_LIST_TYPE_DIRECT,
IID_PPV_ARGS(CmdListAlloc.GetAddressOf())));
// FrameCB = std::make_unique<UploadBuffer<FrameConstants>>(device, 1, true);
PassCB = std::make_unique<UploadBuffer<PassConstants>>(device, passCount, true);
MaterialCB = std::make_unique<UploadBuffer<MaterialConstants>>(device, materialCount, true);
ObjectCB = std::make_unique<UploadBuffer<ObjectConstants>>(device, objectCount, true);
WavesVB = std::make_unique<UploadBuffer<Vertex>>(device, waveVertCount, false);
}
FrameResource::~FrameResource()
{
}